<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>press</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link rel="stylesheet" type="text/css" media="all" href="../../webapp/static/css/list.css"
          th:href="@{/static/css/list.css}"/>
</head>
<body>

<div class="top "><h1 style="text-align: center"> 网上书店管理系统 </h1></div>
<div class="below ">
    <div class="b_left ">
        <ul class="s">
            <li><a href="#">书籍管理</a>
                <ul class="ss">
                    <li><a href="/listCategory">书单列表</a></li>
                    <li><a href="/editaddCategory">新增书籍</a></li>
                    <li><a href="/listPress">出版社信息</a></li>
                </ul>
            </li>
            <li><a href="/listUsers">客户管理</a></li>
            <li><a href="/listBuy">购买记录</a></li>
        </ul>
    </div>
    <div class="b_right ">
        <form action="/searchPress" method="post">
            社长: <input name="p_person"/>
            社名: <input name="p_name"/>
            &nbsp;&nbsp;<button type="submit">搜索</button>
        </form>
        <div class="bookList">
            <table align='center' border='1' cellspacing='0'>
                <tr>
                    <td style="width: 100px">社号</td>
                    <td style="width: 100px">社名</td>
                    <td style="width: 130px">社长</td>
                    <td >联系方式</td>
                    <td>删除</td>
                </tr>
                <tr th:each="c:${page.list}">
                    <td th:text="${c.p_id}"></td>
                    <td th:text="${c.p_name}"></td>
                    <td th:text="${c.p_person}"></td>
                    <td th:text="${c.phone}"></td>
                    <td><a th:href="@{/deletePress(p_id=${c.p_id})}">删除</a></td>
                </tr>
            </table>
            <br/>
            <div>
                <a th:href="@{/listPress(start=0)}">[首 页]</a>
                <a th:href="@{/listPress(start=${page.pageNum-1})}">[上一页]</a>
                <a th:href="@{/listPress(start=${page.pageNum+1})}">[下一页]</a>
                <a th:href="@{/listPress(start=${page.pages})}">[末 页]</a>
            </div>
            <br/>
            <form action="/addPress" method="post">
                社号: <input name="p_id"/> <br/>
                社名: <input name="p_name"/> <br/>
                社长: <input name="p_person"/> <br/>
            联系方式: <input name="phone"/> <br/>
                <button type="reset">重置</button>&nbsp;&nbsp;<button type="submit">提交</button>
            </form>
        </div>
    </div>
</div>
</body>
</html>